package com.welike.shibo.eneity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.welike.shibo.enums.BaseStatusEnum;
import lombok.Data;

import java.util.Date;

/**
 * Created by fangyu on 2019-08-18.
 */
@Data
@TableName(value = "video")
public class Video {
    /**
     * 视频id
     */
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 发布者id
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 音频id
     */
    @TableField(value = "audio_id")
    private String audioId;

    /**
     * 视频定位
     */
    @TableField(value = "video_path")
    private String videoPath;

    /**
     * 视频描述
     */
    @TableField(value = "video_desc")
    private String videoDesc;

    /**
     * 时长
     */
    @TableField(value = "video_duration")
    private Integer videoDuration;

    /**
     * 宽
     */
    @TableField(value = "video_width")
    private Integer videoWidth;

    /**
     * 高
     */
    @TableField(value = "video_height")
    private Integer videoHeight;

    /**
     * 封面图
     */
    @TableField(value = "cover_path")
    private String coverPath;

    /**
     * 点赞数
     */
    @TableField(value = "like_counts")
    private Integer likeCounts;

    /**
     * 评论数
     */
    @TableField(value = "comment_counts")
    private Integer commentCounts;

    /**
     * 分享数
     */
    @TableField(value = "share_counts")
    private Integer shareCounts;

    /**
     * 视频状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 视频链接
     */
    @TableField(value = "video_url")
    private String videoUrl;


    /**
     * 商品id
     */
    @TableField(value = "shop_id")
    private String shopId;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_AUDIO_ID = "audio_id";

    public static final String COL_VIDEO_PATH = "video_path";

    public static final String COL_VIDEO_DESC = "video_desc";

    public static final String COL_VIDEO_DURATION = "video_duration";

    public static final String COL_VIDEO_WIDTH = "video_width";

    public static final String COL_VIDEO_HEIGHT = "video_height";

    public static final String COL_COVER_PATH = "cover_path";

    public static final String COL_LIKE_COUNTS = "like_counts";

    public static final String COL_COMMENT_COUNTS = "comment_counts";

    public static final String COL_SHARE_COUNTS = "share_counts";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_VIDEO_URL = "video_url";

    public static final String COL_SHOP_ID = "shop_id";

    public Video() {
    }

    public Video(String id, String userId, String audioId, String videoPath, String videoDesc, Integer videoDuration, Integer videoWidth, Integer videoHeight, String coverPath, String videoUrl, String shopId) {
        this.id = id;
        this.userId = userId;
        this.audioId = audioId;
        this.videoPath = videoPath;
        this.videoDesc = videoDesc;
        this.videoDuration = videoDuration;
        this.videoWidth = videoWidth;
        this.videoHeight = videoHeight;
        this.coverPath = coverPath;
        this.likeCounts = 0;
        this.commentCounts = 0;
        this.shareCounts = 0;
        this.status = BaseStatusEnum.NORMAL.getCode();
        this.createTime = new Date();
        this.videoUrl = videoUrl;
        this.shopId = shopId;
    }
}